home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / motif21_dev.idb / usr / Motif-2.1 / include / Xm / MwmUtil.h.z / MwmUtil.h
C/C++ Source or Header  |  2002-10-15  |  7KB  |  279 lines

  1. /* 
  2.  *  @OSF_COPYRIGHT@
  3.  *  COPYRIGHT NOTICE
  4.  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
  5.  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
  6.  *  the full copyright text.
  7. */ 
  8. /* 
  9.  * HISTORY
  10. */ 
  11. /*   $XConsortium: MwmUtil.h /main/11 1995/08/18 17:42:47 drk $ */
  12. /*
  13. *  (c) Copyright 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  14. #ifndef _XmMwmUtil_h
  15. #define _XmMwmUtil_h
  16.  
  17. #include <X11/Xmd.h>    /* for protocol typedefs */
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. /* This is duplicated from Xm.h, since we need to check whether to pull in the 
  24.  * SGI extensions, _but_ we don't want to pull in all the other Xm rubbish 
  25.  * --- offer 
  26.  */
  27.  
  28. /*
  29.  * _SGIMOTIF is SGIs look and feel. Turning this off during compilation
  30.  *  of an application would be a bad idea, all the widget structure offsets
  31.  *  will be wrong compared to the shipped library---rmo
  32.  */
  33. #ifndef _NO_SGIMOTIF
  34. #undef _SGIMOTIF
  35. #define _SGIMOTIF TRUE
  36. #else
  37. #undef _SGIMOTIF
  38. #endif
  39.  
  40. /* _SGIBUGFIX is a wrapper around SGI bug fixes. This is also mainly used
  41.  * internal to the library --- rmo
  42.  */
  43. #ifndef _NO_SGIBUGFIX
  44. #undef _SGIBUGFIX
  45. #define _SGIBUGFIX TRUE
  46. #else
  47. #undef _SGIBUGFIX
  48. #endif
  49.  
  50. /* _SGIMOTIFAPI is used to wrap the extenstions to the Motif API that SGI have 
  51.  * made. This may be turned off during application compilation to ensure 
  52.  * that no SGI extensions have been used---rmo
  53.  */ 
  54. #ifdef _SGIMOTIF
  55. #ifndef _NO_SGIMOTIFAPI
  56. #undef  _SGIMOTIFAPI
  57. #define _SGIMOTIFAPI TRUE
  58. #else
  59. #undef _SGIMOTIFAPI
  60. #endif
  61. #endif /* _SGIMOTIF */  
  62.     
  63. #if defined(_SGIMOTIF) && defined(_SGIMOTIFAPI)
  64.  
  65. #ifndef MWM_FUNC_QUIT_APP    
  66. #define MWM_FUNC_QUIT_APP       (1L << 23)
  67. #endif
  68. #ifndef MWM_INFO_STARTUP_SGI
  69. #define MWM_INFO_STARTUP_SGI    (1L << 2)
  70. #endif
  71. #ifndef _XA_WM_QUIT_APP
  72. #define _XA_WM_QUIT_APP         "_WM_QUIT_APP"
  73. #endif
  74. #ifndef _XA_SGI_TELL_WM
  75. #define _XA_SGI_TELL_WM         "_SGI_TELL_WM"
  76. #endif
  77.     
  78. #endif
  79.     
  80.     
  81. /*
  82.  * Contents of the _MWM_HINTS property.
  83.  */
  84.  
  85. typedef struct
  86. {
  87.     /* These correspond to XmRInt resources. (VendorSE.c) */
  88.     int             flags;
  89.     int         functions;
  90.     int         decorations;
  91.     int         input_mode;
  92.     int         status;
  93. } MotifWmHints;
  94.  
  95. typedef MotifWmHints    MwmHints;
  96.  
  97. /* bit definitions for MwmHints.flags */
  98. #define MWM_HINTS_FUNCTIONS    (1L << 0)
  99. #define MWM_HINTS_DECORATIONS    (1L << 1)
  100. #define MWM_HINTS_INPUT_MODE    (1L << 2)
  101. #define MWM_HINTS_STATUS    (1L << 3)
  102.  
  103. /* bit definitions for MwmHints.functions */
  104. #define MWM_FUNC_ALL        (1L << 0)
  105. #define MWM_FUNC_RESIZE        (1L << 1)
  106. #define MWM_FUNC_MOVE        (1L << 2)
  107. #define MWM_FUNC_MINIMIZE    (1L << 3)
  108. #define MWM_FUNC_MAXIMIZE    (1L << 4)
  109. #define MWM_FUNC_CLOSE        (1L << 5)
  110.  
  111. /* bit definitions for MwmHints.decorations */
  112. #define MWM_DECOR_ALL        (1L << 0)
  113. #define MWM_DECOR_BORDER    (1L << 1)
  114. #define MWM_DECOR_RESIZEH    (1L << 2)
  115. #define MWM_DECOR_TITLE        (1L << 3)
  116. #define MWM_DECOR_MENU        (1L << 4)
  117. #define MWM_DECOR_MINIMIZE    (1L << 5)
  118. #define MWM_DECOR_MAXIMIZE    (1L << 6)
  119.  
  120.  
  121. /* definitions for running automated tests */
  122.  
  123.  
  124. #define WINDOW_MINIMIZE_INFO            0
  125. #define WINDOW_MAXIMIZE_INFO            1
  126. #define WINDOW_MOVE_INFO            2
  127. #define WINDOW_RAISE_INFO            3
  128. #define WINDOW_RESIZE_NORTH_INFO           4
  129. #define WINDOW_RESIZE_SOUTH_INFO           5
  130. #define WINDOW_RESIZE_EAST_INFO            6
  131. #define WINDOW_RESIZE_WEST_INFO            7
  132. #define WINDOW_RESIZE_NORTHEAST_INFO       8
  133. #define WINDOW_RESIZE_NORTHWEST_INFO       9
  134. #define WINDOW_RESIZE_SOUTHEAST_INFO       10
  135. #define WINDOW_RESIZE_SOUTHWEST_INFO       11
  136. #define WINDOW_MENU_ITEM_SELECT_INFO    12  
  137. #define WINDOW_DEICONIFY_INFO              13
  138. #define WINDOW_MENU_POST_INFO       14
  139. #define WINDOW_FOCUS_INFO                  15  
  140. #define WINDOW_MENU_UNPOST_INFO      16
  141. #define WINDOW_MENU_ITEM_CHECK_INFO      17
  142. #define ICON_MOVE_INFO               18
  143. #define ICON_MENU_POST_INFO               19
  144. #define ICON_MENU_UNPOST_INFO       20
  145. #define ICON_MENU_ITEM_SELECT_INFO       21
  146.  
  147. #define WM_NORTHWEST                    0
  148. #define WM_NORTH                        1
  149. #define WM_NORTHEAST                    2
  150. #define WM_WEST                         3
  151. #define WM_EAST                         4
  152. #define WM_SOUTHWEST                    5
  153. #define WM_SOUTH                        6
  154. #define WM_SOUTHEAST                    7
  155.  
  156. #define INVALID -1
  157. #define MAX_MENU_ITEMS 20
  158. #define MAX_NAME_LEN 95
  159.  
  160.  
  161. /* values for MwmHints.input_mode */
  162. #define MWM_INPUT_MODELESS            0
  163. #define MWM_INPUT_PRIMARY_APPLICATION_MODAL    1
  164. #define MWM_INPUT_SYSTEM_MODAL            2
  165. #define MWM_INPUT_FULL_APPLICATION_MODAL    3
  166.  
  167. /* bit definitions for MwmHints.status */
  168. #define MWM_TEAROFF_WINDOW    (1L << 0)
  169.  
  170. /*
  171.  * The following is for compatibility only. It use is deprecated.
  172.  */
  173. #define MWM_INPUT_APPLICATION_MODAL    MWM_INPUT_PRIMARY_APPLICATION_MODAL
  174.  
  175.  
  176. /*
  177.  * Contents of the _MWM_INFO property.
  178.  */
  179.  
  180. typedef struct
  181. {
  182.     long    flags;
  183.     Window    wm_window;
  184. } MotifWmInfo;
  185.  
  186. typedef MotifWmInfo    MwmInfo;
  187.  
  188. /* bit definitions for MotifWmInfo .flags */
  189. #define MWM_INFO_STARTUP_STANDARD    (1L << 0)
  190. #define MWM_INFO_STARTUP_CUSTOM        (1L << 1)
  191.  
  192.  
  193.  
  194. /*
  195.  * Definitions for the _MWM_HINTS property.
  196.  */
  197.  
  198. typedef struct
  199. {
  200.     /* 32-bit property items are stored as long on the client (whether
  201.      * that means 32 bits or 64).  XChangeProperty handles the conversion
  202.      * to the actual 32-bit quantities sent to the server.
  203.      */
  204.     unsigned long    flags;
  205.     unsigned long    functions;
  206.     unsigned long    decorations;
  207.     long             inputMode;
  208.     unsigned long    status;
  209. } PropMotifWmHints;
  210.  
  211. typedef PropMotifWmHints    PropMwmHints;
  212.  
  213.  
  214. /* number of elements of size 32 in _MWM_HINTS */
  215. #define PROP_MOTIF_WM_HINTS_ELEMENTS    5
  216. #define PROP_MWM_HINTS_ELEMENTS        PROP_MOTIF_WM_HINTS_ELEMENTS
  217.  
  218. /* atom name for _MWM_HINTS property */
  219. #define _XA_MOTIF_WM_HINTS    "_MOTIF_WM_HINTS"
  220. #define _XA_MWM_HINTS        _XA_MOTIF_WM_HINTS
  221.  
  222. /*
  223.  * Definitions for the _MWM_MESSAGES property.
  224.  */
  225.  
  226. #define _XA_MOTIF_WM_MESSAGES    "_MOTIF_WM_MESSAGES"
  227. #define _XA_MWM_MESSAGES    _XA_MOTIF_WM_MESSAGES
  228.  
  229. /* atom that enables client frame offset messages */
  230. #define _XA_MOTIF_WM_OFFSET    "_MOTIF_WM_OFFSET"
  231.  
  232. /*
  233.  * Definitions for the _MWM_MENU property.
  234.  */
  235.  
  236. /* atom name for _MWM_MENU property */
  237. #define _XA_MOTIF_WM_MENU    "_MOTIF_WM_MENU"
  238. #define _XA_MWM_MENU        _XA_MOTIF_WM_MENU
  239.  
  240.  
  241. /*
  242.  * Definitions for the _MWM_INFO property.
  243.  */
  244.  
  245. typedef struct
  246. {
  247.   /* 32-bit property items are stored as long on the client (whether
  248.    * that means 32 bits or 64).  XChangeProperty handles the conversion
  249.    * to the actual 32-bit quantities sent to the server.
  250.    */
  251.   long        flags;
  252.   Window    wmWindow;
  253. } PropMotifWmInfo;
  254.  
  255. typedef PropMotifWmInfo    PropMwmInfo;
  256.  
  257.  
  258. /* number of elements of size 32 in _MWM_INFO */
  259. #define PROP_MOTIF_WM_INFO_ELEMENTS    2
  260. #define PROP_MWM_INFO_ELEMENTS        PROP_MOTIF_WM_INFO_ELEMENTS
  261.  
  262. /* atom name for _MWM_INFO property */
  263. #define _XA_MOTIF_WM_INFO    "_MOTIF_WM_INFO"
  264. #define _XA_MWM_INFO        _XA_MOTIF_WM_INFO
  265.  
  266.  
  267. /*
  268.  * Miscellaneous atom definitions
  269.  */
  270.  
  271. /* atom for motif input bindings */
  272. #define _XA_MOTIF_BINDINGS    "_MOTIF_BINDINGS"
  273.  
  274. #ifdef __cplusplus
  275. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  276. #endif
  277.  
  278. #endif /* _XmMwmUtil_h */
  279.